#ifndef __CURRENT_H
#define __CURRENT_H
#include "includes.h"


#define STATE_DSG 0
#define STATE_CHG 1
#define STATE_STATIC 3


#define CurLineChange     15/4              // 0.1A/mV 


//#define ADC2CURR(x)    (( ( unsigned long )x * 625L * 2*( unsigned long )CurLineChange + 1024L ) / 2048L)
	

uint8_t CurrentStateDetect(void);

extern uint8_t lecuBuff[8][100];

void ReadCadHv(void);
int32_t processavgCurr(int32_t value);
uint8_t jiexishuju(void);

#endif


